The present invention generally relates to object locks, and more particularly, to a locking method for Java objects that conserves computing resources by allowing various steps to be executed with a single memory fetch instruction.
A Java Virtual machine (JVM) (Java is a trademark of Sun Microsystems Corp.) is used to support a synchronization primitive known as a “monitor” or “lock” on each Java object allocated in a system. In general, a thread or the like will obtain a lock on an object in order to perform some type of command using the object. A lock is typically used to prevent a conflict from occurring when another thread attempts to use the object. With respect to object management, an efficient implementation of object locks allows for the optimal performance of a JVM implementation. A number of locking methods are cited in U.S. Patent Application Publication No. US 2001/0014905 A1, which is herein incorporated by reference.